package com.ybkj.o2o.mc.service.impl;

import com.ybkj.o2o.mc.entity.PassengerGradeAndArea;
import com.ybkj.o2o.mc.mapper.PassengerGradeAndAreaMapper;
import com.ybkj.o2o.mc.service.PassengerGradeAndAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DefaultPassengerGradeAndAreaService implements PassengerGradeAndAreaService {

  @Autowired
  private PassengerGradeAndAreaMapper passengerGradeAndAreaMapper;

  @Override
  public int insert(PassengerGradeAndArea pa) {

    return passengerGradeAndAreaMapper.insert(pa);
  }

  @Override
  public int update(PassengerGradeAndArea pa) {

    return passengerGradeAndAreaMapper.updateByPrimaryKey(pa);
  }

  @Override
  public int delete(Long id, String appKey) {

    return passengerGradeAndAreaMapper.deleteByIdAndAppkey(id,appKey);
  }

  @Override
  public List<PassengerGradeAndArea> findByIdAndAppKey(Long gradeId, String appKey) {

    return passengerGradeAndAreaMapper.findByIdAndAppKey(gradeId,appKey);
  }

}
